#include <iostream>
#define N 3
using namespace std;
int main(){
    int scores[N];
    int sum=0;
    cout<<"请输入 "<<N<<" 个学生成绩"<<endl;
    for(int i=0;i<N;i++){
        cin>>scores[i];
        sum+=scores[i];
    }
    double avg=sum*1.0/N;
    cout<<"平均分是："<<avg<<endl;
    //冒泡排序
    for(int i=0;i<N-1;i++){
        for(int j=0;j<N-i-1;j++){
            if(scores[j]>scores[j+1]){
                int temp=scores[j];
                scores[j]=scores[j+1];
                scores[j+1]=temp;
            }
        }
    }
    cout<<"高于平均分的成绩有："<<endl;
    int index=0;
    while(scores[index]<=avg){
        index++;
    }
    for(int i=index;i<N;i++){
        cout<<scores[i]<<" ";
    }
    return 0;
}